<template>
	<view>
		<view class="top">
			<view class="msg">
				<image src="/static/img/logo2.png"></image>
				<view class="p">
					<text>姓名</text>
					：李宏伟
				</view>
				<view class="p">
					<text>职位</text>
					：客服
				</view>
			</view>
			<image src="/static/img/servicebg.png" class="bg" mode="widthFix"></image>
		</view>
		<view class="line">
			<view class="list3 list-l">
				<view class="list1 bgf3" @click="_router('./newslist')">
					<image src="/static/img/service2.png" />
					<view>消息列表</view>
				</view>
				<view class="list1 bgf4" @click="_router('./audit')">
					<image src="/static/img/service3.png" />
					<view>订单审核</view>
				</view>
			</view>
			<view class="list3 list-r">
				<view class="list1 bgf4" @click="scan()">
					<image src="/static/img/service4.png" />
					<view>扫一扫查看订单信息</view>
				</view>
				<view class="list1 bgf3">
					<image src="/static/img/service5.png" />
					<view>客服报表</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	methods: {
		_router(router) {
			uni.navigateTo({
				url: router
			});
		},
		scan() {
			// #ifdef H5
			
			// #endif
			// #ifdef APP-PLUS
			uni.scanCode({
				success: function(res) {
					console.log('条码类型：' + res.scanType);
					console.log('条码内容：' + res.result);
					uni.showToast({
						title: '条码类型：' + res.scanType + '条码内容：' + res.result,
						duration: 2000
					});
				}
			});
			// #endif
			
		}
	}
};
</script>

<style lang="less" scoped>
.top {
	position: relative;
	font-size: 28rpx;
	.msg {
		position: absolute;
		left: 50%;
		top: 50%;
		z-index: 9;
		transform: translate(-50%, -50%);
		line-height: 56rpx;
		color: #fff;
		text {
			display: inline-block;
			width: 80rpx;
			text-align-last: justify;
		}
		image {
			display: block;
			width: 130rpx;
			height: 130rpx;
			margin: 0 auto 30rpx;
			border-radius: 50%;
		}
	}
	.bg {
		width: 100%;
	}
}
.line {
	display: flex;
	width: 100%;
	margin-top: 37rpx;
	padding: 0 20rpx;
	box-sizing: border-box;
	text-align: center;
	font-size: 30rpx;
	.list-r {
		width: 100%;
		margin-left: 37rpx;
	}

	.list3 {
		flex: 1;
		.list1 {
			height: 225rpx;
			border-radius: 5rpx;
			padding-top: 30rpx;
			box-sizing: border-box;
			background: #ffffff;
			box-shadow: 5rpx 0px 20rpx #c5c5c5;
			view {
				padding-top: 10rpx;
			}
			image {
				width: 86rpx;
				height: 123rpx;
			}
		}
		.bgf3 {
			height: 231rpx;
		}
		.bgf4 {
			height: 314rpx;
			padding-top: 80rpx;
		}
	}
	.list3 .list1:nth-child(1) {
		margin-bottom: 37rpx;
	}
}
</style>
